package com.performanceManagement.service;

import com.performanceManagement.pojo.PerformanceManagement;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.Collection;
import java.util.Date;
import java.util.List;

@Service
public interface PerformanceManagementService {


    /**
     * 生成PerformanceManagement对象实现代码复用
     * @param isAskForLeave
     * @param isLate
     * @param isAbsent
     * @param isLeaveEarly
     * @param workAttitude
     * @param workCompleteness
     * @param eId
     * @return PerformanceManagement
     */
    PerformanceManagement setPerformanceManagement (String isAskForLeave, String isLate, String isAbsent, String isLeaveEarly, String workAttitude, String workCompleteness,Integer eId);

    /**
     * 使用默认值生成绩效表，只需输入员工id
     * @param eId
     */
    void add(Integer eId);


    /**
     * 日期自生成添加绩效
     * @param isAskForLeave
     * @param isLate
     * @param isAbsent
     * @param isLeaveEarly
     * @param workAttitude
     * @param workCompleteness
     * @param eId
     */

    void add(String isAskForLeave, String isLate, String isAbsent, String isLeaveEarly, String workAttitude, String workCompleteness,Integer eId);


    /**
     * 日期选择添加绩效
     * @param isAskForLeave
     * @param isLate
     * @param isAbsent
     * @param isLeaveEarly
     * @param workAttitude
     * @param workCompleteness
     * @param date
     * @param eId
     */
    void add(String isAskForLeave, String isLate, String isAbsent, String isLeaveEarly, String workAttitude, String workCompleteness, Date date,Integer eId);



    /**
     * 按部门查询员工绩效信息
     * @param eDepartment
     * @return
     */
    List<PerformanceManagement> queryByEDepartment(String eDepartment);

    /**
     * 按员工姓名查询员工绩效信息
     * @param eName
     * @return
     */
    List<PerformanceManagement> queryByEName(String eName);

    /**
     * poi的下载到excl
     * @param fileName
     * @param performanceManagementList
     */
    void exportExel(String fileName, List<PerformanceManagement>performanceManagementList)throws Exception;


    /**
     * 下载到excl
     * @param title
     * @param sheetName
     * @param dataSet
     * @param filePath
     * @param fileName
     * @throws IOException
     */
    void excelExport(String title, String sheetName, Collection<PerformanceManagement> dataSet, String filePath, String fileName) throws IOException ;


    /**
     * 下载到excl
     * @param dataSet
     * @param filePath
     * @param fileName
     * @throws IOException
     */
    void excelExport(Collection<PerformanceManagement> dataSet,String filePath,String fileName) throws IOException;

    /**
     * 下载到excl
     * @param dataSet
     * @throws IOException
     */
    void excelExport(Collection<PerformanceManagement> dataSet) throws IOException;

    /**
     * 下载到excl
     * @param dataSet
     * @param fileName
     * @throws IOException
     */
    void excelExport(Collection<PerformanceManagement> dataSet,String fileName) throws IOException;
    }
